<%@page import="java.util.Date" isELIgnored="false" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>找回密码</title>
    <link rel="stylesheet" href="layui-v2.8.4/layui/css/layui.css">
</head>
<body>
<!-- 找回密码页面 -->
<div class="findMM" style="display: flex; justify-content: center; align-items: center; height: 100vh;">
    <div>
        <img src="<%=request.getContextPath() %>/image/login.png" height="150px" width="400px">
        <div class="main_box">
            <div class="findpassword_form">
                <div>
                    <% String tokenValue = new Date().getTime() +""; %>
                    <c:set value="<%=tokenValue %>" var="token" scope="session"/>
                </div>
                <form action="<%=request.getContextPath()%>/findPasswordServlet" method="post">
                    <div>
                        ${sessionScope.message }
                    </div>
                    <div>
                        <input type="hidden" name="token" value="<%=tokenValue %>"/>
                    </div>
                    <div class="form-group">
                        <input type="text" name="username" value="${sessionScope.username}" lay-verify="required" placeholder="账号" autocomplete="off" class="layui-input" lay-affix="clear" required>
                        <%session.removeAttribute("message"); %>
                        <br>
                    </div>
                    <div class="form-group">
                        <input type="text" name="idCard" lay-verify="required" placeholder="凭据默认为本人身份证或护照" autocomplete="off" class="layui-input" lay-affix="clear" required>
                        <br>
                    </div>
                    <div class="form-group">
                        <td>
                            <input type="text" name="CHECK_CODE_PARAM_NAME"  lay-verify="required" placeholder="验证码" autocomplete="off" class="layui-input" lay-affix="clear" required>
                            <img alt="" src="<%= request.getContextPath() %>/validateColorServlet">
                        </td>
                    </div>

                    <div>
                        <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="demo-login" type="submit" name="submit">找回密码</button>
                        <a href="<%=request.getContextPath() %>/login.jsp" style="float: right; margin-top: 7px;">返回登录</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script src="layui-v2.8.4/layui/layui.js"></script>
<link type="text/css" rel="stylesheet" href="layui-v2.8.4/layui/css/layui.css"/>
</body>
</html>